/*
 * @(#)Type.java
 *
 * Revision:
 * Author                                         Date           
 * --------------------------------------------   ------------   
 *  Jeremias D. Serafim de Araujo                    14/11/2012    
 */

package br.edu.ufcg.splab.core.edges;


/**
 *  
 * Type defines the type of edge. That can be 
 * defined as: STEPS (user input), CONDITIONS (system condition) 
 * or EXPECTED_RESULTS (expected output).
 * 
 *
 */

public enum EdgeType {
	DEFAULT("default"),
	STEPS("steps"),
	CONDITIONS("conditions"),
	EXPECTED_RESULTS("expected_results");
	
	String str;
	
	
	
	
	/*
	 * 
	 * Gets and Sets.
	 * 
	 */
	private EdgeType(String str) {
		this.str = str;
	}

	public String getStrType() {
		return str;
	}

	public static EdgeType getInstance(String str) {
		for (EdgeType t : values()) {
			if (t.getStrType().equals(str.toLowerCase())) {
				return t;
			}
		}
		return null;
	}
}


